package com.lizhen.util;

import javax.ejb.Stateful;
import java.util.ArrayList;
import java.util.List;

/**
 * Session Bean implementation class LibrarySessionBean
 */
@Stateful(mappedName = "Stateful")
public class StatefulBean implements SessionBeanRemote {

    List<String> bookShelf = null;

    public StatefulBean() {
        bookShelf = new ArrayList<String>();
    }

    public void addBook(String bookName) {
        bookShelf.add(bookName);
    }

    public List<String> getBooks() {
        return bookShelf;
    }
}
